package com.gof.example.simplefactory;

/**
 * Created with IntelliJ IDEA.
 * Created by zhiyuan on 2018/4/30 10:14.
 * haiming.fei@tongdun.cn
 */
public class CarFactory {

    public static <T extends Car> T createCar(Class<T> cls) throws IllegalAccessException, InstantiationException {
        return cls.newInstance();
    }
}
